package my_test;

import java.util.HashMap;
import java.util.Scanner;

public class intput {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();
        s1 = s1.replaceAll(" ","");
        s2 = s2.replaceAll(" ","");
        System.out.println(s1);
        System.out.println(s2);

        HashMap<Object, Object> map = new HashMap<>();




    }
    public int[] test(){
        return new int[]{-1, -1};
    }

}
